import { getAllbanners } from "@/services/bannersService";
export default {
    namespaced: true,
    state: {
        banners: [],
    },
    mutations: {

        setBanners(state, payload) {
            state.banners = payload
        },
    },
    actions: {
        async getBannersData(context) {
            let resp = await getAllbanners();
            console.log(resp);
            // 将用户数据储存在state中
            context.commit("setBanners", resp);
            return resp;
        },
    }
}